# CMake root file for duilib related apps
#Date 2012-09-16
#Author: Qi Gao(monkgau@gmail.com)
#
#  CMake files for duilib
#  file for each app is under the related sub-dir
#

cmake_minimum_required(VERSION 2.8)

project(duilib)

message(STATUS," CMake project files for duilib")

# this line is for UNICODE release,which is required by DuiDesigner 
add_definitions(-DUNICODE -D_UNICODE)

# add each CMake file
add_subdirectory(duilib)
add_subdirectory(DuiDesigner)
add_subdirectory(360SafeDemo)
add_subdirectory(FlashDemo)
add_subdirectory(GameDemo)
add_subdirectory(ListDemo)
add_subdirectory(MenuDemo)
add_subdirectory(QQDemo)
add_subdirectory(RichListDemo)

FILE(GLOB Control ${CMAKE_CURRENT_LIST_DIR}/Duilib/Control/*.h)
FILE(GLOB Core ${CMAKE_CURRENT_LIST_DIR}/Duilib/Core/*.h)
FILE(GLOB Layout ${CMAKE_CURRENT_LIST_DIR}/Duilib/Layout/*.h)
FILE(GLOB Utils ${CMAKE_CURRENT_LIST_DIR}/Duilib/Utils/*.h)

install(TARGETS duilib
        RUNTIME DESTINATION bin
        LIBRARY DESTINATION lib
        ARCHIVE DESTINATION lib/static
)

install(FILES ${CMAKE_CURRENT_LIST_DIR}/Duilib/UIlib.h DESTINATION duilib)
install(FILES ${CMAKE_CURRENT_LIST_DIR}/Duilib/StdAfx.h DESTINATION duilib)
install(FILES ${Control} DESTINATION duilib/Control)
install(FILES ${Core} DESTINATION duilib/Core)
install(FILES ${Layout} DESTINATION duilib/Layout)
install(FILES ${Utils} DESTINATION duilib/Utils)
